﻿  <div class="wrap">
        <!--左边栏-->
        <div class="lt">
            <div class="sidebar">
                <div class="sidebartop">
                    <p>
                        <img src="../../../images/common/toux1.png" /></p>
                    <p>{{username}}</p>
                    <p><i class="fa fa-database"></i>41204</p>
                </div>
                <div class="sidebarbotm">
                    <ul>
                        <li><a href="#error" class="active">错题集</a></li>
                        <!--<li><a href="">我的班级</a></li>
                        <li><a href="">作业</a></li>
                        <li><a href="">问答</a></li>-->
                    </ul>
                </div>
            </div>
        </div>
        <!--end 左边栏-->
        <!--右侧-->
        <div class="rt rightside">
            <!--条件删选-->
            <div class="condition">
                <ul class="select">
                    <li class="select-list">
                        <dl id="select1">
                            <dt>主观原因：</dt>
                            <dd class="select-all" ng-class="{selected:reason_num==-1}" ng-click="reasonChosen('',-1)"><a href="">全部</a></dd>
                            <dd ng-repeat="item in reasonList" ng-class="{selected:reason_num==$index}" ng-click="reasonChosen(item.id,$index)"><a ng-if="item.id!='00000000-0000-0000-0000-000000000000'" href="">{{item.reason_text}}</a></dd>
                        </dl>
                    </li>
                    <li class="select-list">
                        <dl id="select1">
                            <dt>教材：</dt>
                            <dd class="select-all" ng-class="{selected:material_num==-1}" ng-click="materialChosen('',-1)"><a href="">全部</a></dd>
                            <dd ng-repeat="item in materialsList" ng-class="{selected:material_num==$index}" ng-click="materialChosen(item.id,$index)"><a href="">{{item.book_type}}</a></dd>
                        </dl>
                    </li>
                    <li class="select-list">
                        <dl id="select2">
                            <dt>试题场景：</dt>
                            <dd class="select-all" ng-class="{selected:scene_num==-1}" ng-click="sceneChosen('',-1)"><a href="">全部</a></dd>
                            <dd ng-repeat="item in sceneList" ng-class="{selected:scene_num==$index}" ng-click="sceneChosen(item.id,$index)"><a href="">{{item.placename}}</a></dd>
                        </dl>
                    </li>
                    <li class="select-list">
                        <dl id="select3">
                            <dt>题型：</dt>
                            <dd class="select-all" ng-class="{selected:type_num==-1}" ng-click="typeChosen('',-1)"><a href="">全部</a></dd>
                            <dd ng-repeat="item in typeList" ng-class="{selected:type_num==$index}" ng-click="typeChosen(item.id,$index)"><a href="">{{item.name}}</a></dd>
                        </dl>
                    </li>
                    <li class="select-list">
                        <dl id="select4">
                            <dt>知识点：</dt>
                            <dd class="select-all" ng-class="{selected:knowledge_num==-1}" ng-click="knowledgeChosen('',-1)"><a href="">全部</a></dd>
                            <dd ng-repeat="item in knowledgeList" ng-class="{selected:knowledge_num==$index}" ng-click="knowledgeChosen(item.id,$index)"><a href="">{{item.name}}</a></dd>
                        </dl>
                    </li>
                </ul>
            </div>
            <!--end 条件删选-->
            <!--排序-->
            <div class="sort">
                <ul class="lt">
                    <li><a href="" ng-click="sortBy(0)">日期排序</a></li>
                    <li><a href="" ng-click="sortBy(1)">错误次数</a></li>
                </ul>
                <div class="r_button rt">
                    <span>{{errorList.length}}题/{{page_total}}页</span>
                    <button type="button" class="btn btn-warning" ng-click="practice()">巩固练习</button>
                </div>
            </div>
            <!--end 排序-->
            <!--题目-->
            <div class="content panel-group" id="accordion2">
                <div class="subject" ng-repeat="item in errorList" ng-init="outindex=$index">
                    <h6 style="line-height:2"><span>题{{$index+1}}</span>{{item.exercises_name}}</h6>
                    <ul>
                        <li ng-repeat="x in item.xt_exercises_select"><span>{{x.name}}</span>{{x.namestr}}</li>
                    </ul>
                    <div class="reason">
                        <ul>
                            <li ng-repeat="x in item.xt_err_rea">
                                <a ng-if="x.reason_id!='00000000-0000-0000-0000-000000000000'" href="" ng-class="{active:x.istrue==1}" ng-click="selectReason(outindex,$index)">{{x.reason_text}}</a>
                                <p ng-if="x.reason_id=='00000000-0000-0000-0000-000000000000'">错在哪：<input type="text" ng-model="x.reason_text" ng-blur="set_reason_text(outindex)" /></p>
                            </li>
                        </ul>
                    </div>
                    <div class="panel panel-default answer">
                        <div class="panel-heading chapter">
                            <h4 class="panel-title">
                                <a data-toggle="collapse" data-parent="#accordion2" href="\#collapse{{$index}}">
                                    <i>正确答案&解析</i>
                                    <span class="glyphicon glyphicon-chevron-down"></span>
                                </a>
                            </h4>
                        </div>
                        <div id="collapse{{$index}}" class="panel-collapse collapse">
                            <div class="panel-body">
                                <p>正确答案：<span>{{item.results}}</span></p>
                                <p>解析：</p>
                                <p>{{item.exercisesanalysis}}</p>
                            </div>
                        </div>
                    </div>
                </div>
                <!--分页-->
                <ul class="pagination rt page">
                    <li><a href="" ng-click="prev()" ng-class="{disabled:searchList.pageindex<=0}"><i class="fa fa-caret-left"></i>上一页</a></li>
                    <li ng-repeat="item in page track by $index"><a href="" ng-class="{active:searchList.pageindex==$index}" ng-click="choosenPage($index)">{{$index+1}}</a></li>
                    <li><a href="" ng-click="next()" ng-class="{disabled:searchList.pageindex>=page_total-1}">下一页&nbsp;<i class="fa fa-caret-right"></i></a></li>
                </ul>
                <!--end 分页-->
            </div>
            <!--end 题目-->
        </div>
        <!--end 右侧-->
    </div>

